<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>Collision Checker: /home/osboxes/Documents/p3/root_comm/root/tools/commonroad-collision-checker/cpp/collision/boundingvolume.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Collision Checker
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>File&#160;Members</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_df511e5bd85cec96854b39d5e1c27aa8.html">cpp</a></li><li class="navelem"><a class="el" href="dir_bf0f0c8865c1942e08ab5157e2c596db.html">collision</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">boundingvolume.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="boundingvolume_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="preprocessor">#ifndef BOUNDINGVOLUME_H_</span></div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="preprocessor">#define BOUNDINGVOLUME_H_</span></div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;</div><div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="preprocessor">#include &lt;iostream&gt;</span></div><div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="preprocessor">#include &lt;vector&gt;</span></div><div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="preprocessor">#include &lt;array&gt;</span></div><div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="collision__object_8h.html">collision_object.h</a>&quot;</span></div><div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;</div><div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="keyword">namespace </span><a class="code" href="namespacecollision.html">collision</a> {</div><div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;</div><div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="comment">//class BoundingVolume : public CollisionObject {</span></div><div class="line"><a name="l00012"></a><span class="lineno"><a class="line" href="classcollision_1_1_bounding_volume.html">   12</a></span>&#160;<span class="keyword">class </span><a class="code" href="classcollision_1_1_bounding_volume.html">BoundingVolume</a>{</div><div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;</div><div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;<span class="keyword">public</span>:</div><div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;</div><div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;  <a class="code" href="classcollision_1_1_bounding_volume.html#a2f68a9504948dae8062c6b61c8490c7e">BoundingVolume</a>(std::array&lt;double,2&gt; <a class="code" href="classcollision_1_1_bounding_volume.html#aa08acbdd9abe467b6dd4019a48c0fb77">x</a>, std::array&lt;double,2&gt; <a class="code" href="classcollision_1_1_bounding_volume.html#a477833000b70d61c1ab45131fbc95793">y</a>,</div><div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;                 std::array&lt;int,2&gt; <a class="code" href="classcollision_1_1_bounding_volume.html#a76bc2fdfa22420fbe44b1ce594f23032">t</a>, <a class="code" href="namespacecollision.html#a405f2c04407997fea529aad88f04ad30">CollisionObjectConstPtr</a> = NULL);</div><div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;  <a class="code" href="classcollision_1_1_bounding_volume.html#a2f68a9504948dae8062c6b61c8490c7e">BoundingVolume</a>(std::vector&lt;BoundingVolumeConstPtr&gt;);</div><div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;</div><div class="line"><a name="l00020"></a><span class="lineno"><a class="line" href="classcollision_1_1_bounding_volume.html#af6f8a9e6ee2b50467a68cf3aa199b884">   20</a></span>&#160;  <span class="keyword">virtual</span> <a class="code" href="classcollision_1_1_bounding_volume.html#af6f8a9e6ee2b50467a68cf3aa199b884">~BoundingVolume</a>() {};</div><div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;</div><div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;    <span class="comment">// bool collide(const CollisionObject&amp; c) const;</span></div><div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;    <span class="comment">// bool collide(const Shape&amp; shape) const;</span></div><div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;    <span class="comment">// bool collide(const Point&amp; point) const;</span></div><div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;    <span class="comment">// bool collide(const RectangleAABB&amp; aabb) const;</span></div><div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;    <span class="comment">// bool collide(const RectangleOBB&amp; obb) const;</span></div><div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;    <span class="comment">// bool collide(const Sphere&amp; sphere) const;</span></div><div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;    <span class="comment">// bool collide(const Triangle&amp; triangle) const;</span></div><div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;    <span class="comment">// bool collide(const TimeVariantCollisionObject&amp; tvco) const;</span></div><div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;    <span class="comment">// bool collide(const ShapeGroup&amp; sg) const;</span></div><div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;    <span class="comment">// bool collide(const BoundingVolume&amp; bv) const;</span></div><div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;</div><div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;    <span class="comment">// //! Print all parameters of the bounding volume</span></div><div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;    <span class="comment">// void print(std::ostringstream &amp;stream) const;</span></div><div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;    <span class="comment">// virtual CollisionObjectConstPtr timeSlice(int time_idx, CollisionObjectConstPtr shared_ptr_this) const;</span></div><div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;  <a class="code" href="namespacecollision.html#ad1f68b4864b28e2694b3b3b7a1f9e43c">BoundingVolumeConstPtr</a> <a class="code" href="classcollision_1_1_bounding_volume.html#af54ac98f6a3afb4cb27864ed71d68fdd">getBoundingVolume</a>() <span class="keyword">const</span>;</div><div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;  <span class="keywordtype">bool</span> <a class="code" href="classcollision_1_1_bounding_volume.html#a6f6e10fdfdd9439d462bd48c4175c959">isLeaf</a>() <span class="keyword">const</span>;</div><div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;</div><div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;  std::vector&lt;BoundingVolumeConstPtr&gt; <a class="code" href="classcollision_1_1_bounding_volume.html#ae6ee85c9ad44c5e777030b3f6d7bc687">getChildrenBoundingVolumes</a>() <span class="keyword">const</span>;</div><div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;  std::vector&lt;CollisionObjectConstPtr&gt; <a class="code" href="classcollision_1_1_bounding_volume.html#afdeddcd5e5c1356db25ffbb089e17823">getChildrenCollisionObjects</a>() <span class="keyword">const</span>;</div><div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;  std::array&lt;double,2&gt; <a class="code" href="classcollision_1_1_bounding_volume.html#aa08acbdd9abe467b6dd4019a48c0fb77">x</a>() <span class="keyword">const</span>;</div><div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;  std::array&lt;double,2&gt; <a class="code" href="classcollision_1_1_bounding_volume.html#a477833000b70d61c1ab45131fbc95793">y</a>() <span class="keyword">const</span>;</div><div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;  std::array&lt;int,2&gt; <a class="code" href="classcollision_1_1_bounding_volume.html#a76bc2fdfa22420fbe44b1ce594f23032">t</a>() <span class="keyword">const</span>;</div><div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;</div><div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;<span class="keyword">private</span>:</div><div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;  std::array&lt;double,2&gt; x_;</div><div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;  std::array&lt;double,2&gt; y_;</div><div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;  std::array&lt;int,2&gt; t_;</div><div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;  std::vector&lt;BoundingVolumeConstPtr&gt; children_BV_;</div><div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;  std::vector&lt;CollisionObjectConstPtr&gt; children_CO_;</div><div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;};</div><div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;</div><div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;}</div><div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;</div><div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;<span class="preprocessor">#endif</span></div><div class="ttc" id="classcollision_1_1_bounding_volume_html_a6f6e10fdfdd9439d462bd48c4175c959"><div class="ttname"><a href="classcollision_1_1_bounding_volume.html#a6f6e10fdfdd9439d462bd48c4175c959">collision::BoundingVolume::isLeaf</a></div><div class="ttdeci">bool isLeaf() const </div><div class="ttdef"><b>Definition:</b> <a href="boundingvolume_8cc_source.html#l00020">boundingvolume.cc:20</a></div></div>
<div class="ttc" id="classcollision_1_1_bounding_volume_html_aa08acbdd9abe467b6dd4019a48c0fb77"><div class="ttname"><a href="classcollision_1_1_bounding_volume.html#aa08acbdd9abe467b6dd4019a48c0fb77">collision::BoundingVolume::x</a></div><div class="ttdeci">std::array&lt; double, 2 &gt; x() const </div><div class="ttdef"><b>Definition:</b> <a href="boundingvolume_8cc_source.html#l00119">boundingvolume.cc:119</a></div></div>
<div class="ttc" id="classcollision_1_1_bounding_volume_html"><div class="ttname"><a href="classcollision_1_1_bounding_volume.html">collision::BoundingVolume</a></div><div class="ttdef"><b>Definition:</b> <a href="boundingvolume_8h_source.html#l00012">boundingvolume.h:12</a></div></div>
<div class="ttc" id="classcollision_1_1_bounding_volume_html_ae6ee85c9ad44c5e777030b3f6d7bc687"><div class="ttname"><a href="classcollision_1_1_bounding_volume.html#ae6ee85c9ad44c5e777030b3f6d7bc687">collision::BoundingVolume::getChildrenBoundingVolumes</a></div><div class="ttdeci">std::vector&lt; BoundingVolumeConstPtr &gt; getChildrenBoundingVolumes() const </div><div class="ttdoc">Get member variables. </div><div class="ttdef"><b>Definition:</b> <a href="boundingvolume_8cc_source.html#l00111">boundingvolume.cc:111</a></div></div>
<div class="ttc" id="classcollision_1_1_bounding_volume_html_a76bc2fdfa22420fbe44b1ce594f23032"><div class="ttname"><a href="classcollision_1_1_bounding_volume.html#a76bc2fdfa22420fbe44b1ce594f23032">collision::BoundingVolume::t</a></div><div class="ttdeci">std::array&lt; int, 2 &gt; t() const </div><div class="ttdef"><b>Definition:</b> <a href="boundingvolume_8cc_source.html#l00125">boundingvolume.cc:125</a></div></div>
<div class="ttc" id="classcollision_1_1_bounding_volume_html_af6f8a9e6ee2b50467a68cf3aa199b884"><div class="ttname"><a href="classcollision_1_1_bounding_volume.html#af6f8a9e6ee2b50467a68cf3aa199b884">collision::BoundingVolume::~BoundingVolume</a></div><div class="ttdeci">virtual ~BoundingVolume()</div><div class="ttdef"><b>Definition:</b> <a href="boundingvolume_8h_source.html#l00020">boundingvolume.h:20</a></div></div>
<div class="ttc" id="classcollision_1_1_bounding_volume_html_af54ac98f6a3afb4cb27864ed71d68fdd"><div class="ttname"><a href="classcollision_1_1_bounding_volume.html#af54ac98f6a3afb4cb27864ed71d68fdd">collision::BoundingVolume::getBoundingVolume</a></div><div class="ttdeci">BoundingVolumeConstPtr getBoundingVolume() const </div><div class="ttdoc">Dispatcher functions. </div><div class="ttdef"><b>Definition:</b> <a href="boundingvolume_8cc_source.html#l00105">boundingvolume.cc:105</a></div></div>
<div class="ttc" id="namespacecollision_html_a405f2c04407997fea529aad88f04ad30"><div class="ttname"><a href="namespacecollision.html#a405f2c04407997fea529aad88f04ad30">collision::CollisionObjectConstPtr</a></div><div class="ttdeci">std::shared_ptr&lt; const CollisionObject &gt; CollisionObjectConstPtr</div><div class="ttdef"><b>Definition:</b> <a href="collision__object_8h_source.html#l00032">collision_object.h:32</a></div></div>
<div class="ttc" id="namespacecollision_html"><div class="ttname"><a href="namespacecollision.html">collision</a></div><div class="ttdef"><b>Definition:</b> <a href="_application_8h_source.html#l00025">Application.h:25</a></div></div>
<div class="ttc" id="classcollision_1_1_bounding_volume_html_a477833000b70d61c1ab45131fbc95793"><div class="ttname"><a href="classcollision_1_1_bounding_volume.html#a477833000b70d61c1ab45131fbc95793">collision::BoundingVolume::y</a></div><div class="ttdeci">std::array&lt; double, 2 &gt; y() const </div><div class="ttdef"><b>Definition:</b> <a href="boundingvolume_8cc_source.html#l00122">boundingvolume.cc:122</a></div></div>
<div class="ttc" id="collision__object_8h_html"><div class="ttname"><a href="collision__object_8h.html">collision_object.h</a></div></div>
<div class="ttc" id="classcollision_1_1_bounding_volume_html_afdeddcd5e5c1356db25ffbb089e17823"><div class="ttname"><a href="classcollision_1_1_bounding_volume.html#afdeddcd5e5c1356db25ffbb089e17823">collision::BoundingVolume::getChildrenCollisionObjects</a></div><div class="ttdeci">std::vector&lt; CollisionObjectConstPtr &gt; getChildrenCollisionObjects() const </div><div class="ttdef"><b>Definition:</b> <a href="boundingvolume_8cc_source.html#l00116">boundingvolume.cc:116</a></div></div>
<div class="ttc" id="namespacecollision_html_ad1f68b4864b28e2694b3b3b7a1f9e43c"><div class="ttname"><a href="namespacecollision.html#ad1f68b4864b28e2694b3b3b7a1f9e43c">collision::BoundingVolumeConstPtr</a></div><div class="ttdeci">std::shared_ptr&lt; const BoundingVolume &gt; BoundingVolumeConstPtr</div><div class="ttdef"><b>Definition:</b> <a href="collision__object_8h_source.html#l00035">collision_object.h:35</a></div></div>
<div class="ttc" id="classcollision_1_1_bounding_volume_html_a2f68a9504948dae8062c6b61c8490c7e"><div class="ttname"><a href="classcollision_1_1_bounding_volume.html#a2f68a9504948dae8062c6b61c8490c7e">collision::BoundingVolume::BoundingVolume</a></div><div class="ttdeci">BoundingVolume(std::array&lt; double, 2 &gt; x, std::array&lt; double, 2 &gt; y, std::array&lt; int, 2 &gt; t, CollisionObjectConstPtr=NULL)</div><div class="ttdef"><b>Definition:</b> <a href="boundingvolume_8cc_source.html#l00009">boundingvolume.cc:9</a></div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.11
</small></address>
</body>
</html>
